package com.zsh.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import android.provider.ContactsContract.StatusUpdates;


public class Util {
	
	public static Date strToDate(String dateString) {
		SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss",java.util.Locale.CHINESE);
		Date d = null;
		try {
			d = sdf.parse(dateString);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return d;
	}
	
	public static String dateToStr(Date d) {
		SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss",java.util.Locale.CHINESE);
		return sdf.format(d);
	}
	
//		System.out.println((d=strToDate("2003/05/13 10:31:37")).toString());
//		System.out.println(dateToStr(d));
}
